oracle.pg.text

## Class OracleIndexParameters

- java.lang.Object
- - oracle.pg.text.OracleIndexParameters

- Direct Known Subclasses:
    LuceneIndexParameters, SolrIndexParameters

      public class OracleIndexParameters
      extends Object

  This class manages relevant parameters for text indexing. Such parameters include the Search engine (SolrCloud, Lucene) used, batch size, commit size, and degree of parallelism (DOP).

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `BATCH_SIZE_PARAMETER` This constant denotes the parameter for the batch size used to force a flush over the index
    `static String` | `COMMIT_BATCH_SIZE_PARAMETER` This constant denotes the parameter for the commit size used to force a commit over the index
    `static Integer` | `LUCENE_ENGINE` This constant denotes the usage of a Lucene search engine
    `static int` | `MAX_BATCH` This constant denotes the maximum batch size allowed
    `static Integer` | `MAX_COMMIT` This constant denotes the maximum commit size allowed
    `static int` | `MAX_COMMIT_BATCH` This constant denotes the maximum commit size allowed
    `static Integer` | `MAX_CONNS` This constant denotes the maximum number of connections to the property graph used when indexing data
    `static Integer` | `MAX_WAIT_TIMEOUT` This constant the maximum write timeout to wait when retrying a write operation
    `static String` | `REINDEX_NUM_CONNS_PARAMETER` This constant denotes the parameter for the number of connections to the property graph used when indexing data
    `static String` | `SEARCH_ENGINE_PARAMETER` This constant denotes the parameter for the search engine used for text indexing and searching: Lucene or SolrCloud
    `static Integer` | `SOLR_ENGINE` This constant denotes the usage of a SolrCloud search engine
    `static String` | `WRITE_TIMEOUT_PARAMETER` This constant denotes the parameter for the timeout to wait when retrying a write operation

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OracleIndexParameters()` Creates a new OracleIndexParameters object.
    `OracleIndexParameters(List<Parameter> parameters)` Creates a new OracleIndexParameters object from an initial set of parameters.
    `OracleIndexParameters(Parameter[] parameters)` Creates a new OracleIndexParameters object from an initial set of parameters.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addParameter(Parameter parameter)` Adds a new parameter to this OracleIndexParameters object
    `static OracleIndexParameters` | `buildFS(int numSubDirs, int reindexNumConns, int batchSize, int commitBatchSize, boolean differentiateDatatypes, String dirname)` Creates a new OracleIndexParameters object from the set of parameters using Lucene engine.
    `static OracleIndexParameters` | `buildFS(int numSubDirs, int reindexNumConns, int batchSize, int commitBatchSize, boolean differentiateDatatypes, String[] dirnames)` Creates a new OracleIndexParameters object from the set of parameters using Lucene engine.
    `static OracleIndexParameters` | `buildSolr(String configName, String solrServerURL, String solrNodeSet, int zkTimeout, int numShards, int replicationFactor, int maxShardsPerNode, int reindexNumConns, int batchSize, int commitBatchSize, long writeTimeout)` Creates a new OracleIndexParameters object from the set of parameters using SolrCloud engine.
    `static Parameter[]` | `defaultIndexParams()` Gets Oracle's default array of parameters defined for an index.
    `static List<Parameter>` | `defaultIndexParamsAsList()` Gets Oracle's default list of parameters defined for an index.
    `Parameter[]` | `getParameters()` Gets the index parameters associated to this object.
    `String` | `toString()` String utility to print out all index parameters.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### BATCH_SIZE_PARAMETER

          public static final String BATCH_SIZE_PARAMETER

      This constant denotes the parameter for the batch size used to force a flush over the index
      See Also:
        Constant Field Values

    - #### COMMIT_BATCH_SIZE_PARAMETER

          public static final String COMMIT_BATCH_SIZE_PARAMETER

      This constant denotes the parameter for the commit size used to force a commit over the index
      See Also:
        Constant Field Values

    - #### LUCENE_ENGINE

          public static final Integer LUCENE_ENGINE

      This constant denotes the usage of a Lucene search engine

    - #### MAX_BATCH

          public static final int MAX_BATCH

      This constant denotes the maximum batch size allowed
      See Also:
        Constant Field Values

    - #### MAX_COMMIT

          public static final Integer MAX_COMMIT

      This constant denotes the maximum commit size allowed

    - #### MAX_COMMIT_BATCH

          public static final int MAX_COMMIT_BATCH

      This constant denotes the maximum commit size allowed
      See Also:
        Constant Field Values

    - #### MAX_CONNS

          public static final Integer MAX_CONNS

      This constant denotes the maximum number of connections to the property graph used when indexing data

    - #### MAX_WAIT_TIMEOUT

          public static final Integer MAX_WAIT_TIMEOUT

      This constant the maximum write timeout to wait when retrying a write operation

    - #### REINDEX_NUM_CONNS_PARAMETER

          public static final String REINDEX_NUM_CONNS_PARAMETER

      This constant denotes the parameter for the number of connections to the property graph used when indexing data
      See Also:
        Constant Field Values

    - #### SEARCH_ENGINE_PARAMETER

          public static final String SEARCH_ENGINE_PARAMETER

      This constant denotes the parameter for the search engine used for text indexing and searching: Lucene or SolrCloud
      See Also:
        Constant Field Values

    - #### SOLR_ENGINE

          public static final Integer SOLR_ENGINE

      This constant denotes the usage of a SolrCloud search engine

    - #### WRITE_TIMEOUT_PARAMETER

          public static final String WRITE_TIMEOUT_PARAMETER

      This constant denotes the parameter for the timeout to wait when retrying a write operation
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### OracleIndexParameters

          public OracleIndexParameters()

      Creates a new OracleIndexParameters object.

    - #### OracleIndexParameters

          public OracleIndexParameters(List<Parameter> parameters)

      Creates a new OracleIndexParameters object from an initial set of parameters.

    - #### OracleIndexParameters

          public OracleIndexParameters(Parameter[] parameters)

      Creates a new OracleIndexParameters object from an initial set of parameters.

  - ### Method Detail

    - #### addParameter

          public void addParameter(Parameter parameter)

      Adds a new parameter to this OracleIndexParameters object
      Parameters:
        `parameter` - a `Parameter` object

    - #### buildFS

          public static OracleIndexParameters buildFS(int numSubDirs,
                                      int reindexNumConns,
                                      int batchSize,
                                      int commitBatchSize,
                                      boolean differentiateDatatypes,
                                      String dirname)

      Creates a new OracleIndexParameters object from the set of parameters using Lucene engine.
      Parameters:
        `numSubDirs` - the number of sub-directories to store the index
        `reindexNumConns` - the number of connections to use when dealing with re-indexing operations
        `batchSize` - the batch size to use when indexing data. This reduce the round trip operations over the Lucene index
        `commitBatchSize` - the commit batch size to use when indexing data. This reduce the number of commit operations over the Lucene index
        `differentiateDatatypes` - if true, data types will be used when indexing data into the Lucene index
        `dirname` - the directory name where the Lucene index is stored. All sub-directories will be stored under this file-path.

    - #### buildFS

          public static OracleIndexParameters buildFS(int numSubDirs,
                                      int reindexNumConns,
                                      int batchSize,
                                      int commitBatchSize,
                                      boolean differentiateDatatypes,
                                      String[] dirnames)

      Creates a new OracleIndexParameters object from the set of parameters using Lucene engine.
      Parameters:
        `numSubDirs` - the number of sub-directories to store the index
        `reindexNumConns` - the number of connections to use when dealing with re-indexing operations
        `batchSize` - the batch size to use when indexing data. This reduce the round trip operations over the Lucene index
        `commitBatchSize` - the commit batch size to use when indexing data. This reduce the number of commit operations over the Lucene index
        `differentiateDatatypes` - if true, data types will be used when indexing data into the Lucene index
        `dirnames` - an array of directory names where the Lucene index will be stored. Sub-directories will be distributed among these file-paths.

    - #### buildSolr

          public static OracleIndexParameters buildSolr(String configName,
                                        String solrServerURL,
                                        String solrNodeSet,
                                        int zkTimeout,
                                        int numShards,
                                        int replicationFactor,
                                        int maxShardsPerNode,
                                        int reindexNumConns,
                                        int batchSize,
                                        int commitBatchSize,
                                        long writeTimeout)

      Creates a new OracleIndexParameters object from the set of parameters using SolrCloud engine.
      Parameters:
        `configName` - the configuration name used to create the SOLR cloud collection where the index will be stored
        `solrServerURL` - the SolrCloud server URL used to connect to the SolrCloud service. E.g., http://localhost:2181/solr
        `solrNodeSet` - a string representing the node set used to store the SolrCloud collection. E.g. node01:8983_solr,node02:8983_solr,node03:8983_solr
        `zkTimeout` - a positive integer representing the timeout (in seconds) used to wait for a Zookeeper connection.
        `numShards` - a positive integer representing the number of shards used in the SolrCloud collection.
        `replicationFactor` - a positive integer representing the replication factor used in the SolrCloud collection.
        `maxShardsPerNode` - a positive integer representing the maximum shards per node used in the SolrCloud collection.
        `reindexNumConns` - the number of connections to use when dealing with re-indexing operations
        `batchSize` - the batch size to use when indexing data. This reduce the round trip operations over the index
        `commitBatchSize` - the commit batch size to use when indexing data. This reduce the number of commit operations over the index
        `writeTimeout` - the timeout (in secs) that is allowed to wait for a index write operation.

    - #### defaultIndexParams

          public static final Parameter[] defaultIndexParams()

      Gets Oracle's default array of parameters defined for an index.
      Returns:
        an array of Parameter objects

    - #### defaultIndexParamsAsList

          public static List<Parameter> defaultIndexParamsAsList()

      Gets Oracle's default list of parameters defined for an index.
      Returns:
        a list of Parameter objects

    - #### getParameters

          public final Parameter[] getParameters()

      Gets the index parameters associated to this object.
      Returns:
        an array of Parameter objects

    - #### toString

          public String toString()

      String utility to print out all index parameters.
      Overrides:
        `toString` in class `Object`

Copyright © 2015 Oracle and/or its afflilates. All Rights Reserved.